// 课后点评相关
import request from "@/utils/request";

export function getTemplateListAPI(data) {
  return request({
    url: "/tEvaluateTemplate/list",
    method: "get",
    params: data,
  });
}

export function getTemplateDetailAPI(data) {
  return request({
    url: "/tEvaluateTemplate/getTempById",
    method: "post",
    data: data,
  });
}

export function saveTemplateAPI(data) {
  return request({
    url: "/tEvaluateTemplate/save",
    method: "post",
    data: data,
  });
}

export function updateTemplateAPI(data) {
  return request({
    url: "/tEvaluateTemplate//update",
    method: "post",
    data: data,
  });
}

export function deleteTemplateAPI(data) {
  return request({
    url: "/tEvaluateTemplate/delete",
    method: "post",
    data: data,
  });
}

// 模版停用/启用
export function changeTemplateStatusAPI(data) {
  return request({
    url: "/tEvaluateTemplate/templateStatus",
    method: "post",
    data: data,
  });
}
// 课程的评分模板
export function getCourseListInTemplateAPI(data) {
  return request({
    url: "/tEvaluateTemplate/courseTemplateList",
    method: "post",
    data: data,
  });
}

// 评价记录列表
export function getEvaluationRecordListAPI(data) {
  return request({
    url: "/tEvaluate/evaluationRecordsList",
    method: "get",
    params: data,
  });
}

// 学员评价列表
export function getEvaluateStudentListAPI(data) {
  return request({
    url: "/tEvaluate/evaluateStudentList",
    method: "get",
    params: data,
  });
}

// 某课时的点评列表

export function getEvaluateListAPI(data) {
  return request({
    url: "/tEvaluate/evaluateList",
    method: "get",
    params: data,
  });
}

// 上传文件
export function uploadFileAPI(data) {
  return request({
    url: "/obsStorage/upload",
    method: "post",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
  });
}

// 删除文件
export function deleteFileAPI(data) {
  return request({
    url: "/obsStorage/delete",
    method: "post",
    data: data,
  });
}

// 发布评价
export function updateEvaluateAPI(data) {
  return request({
    url: "/tEvaluate/updateEvaluate",
    method: "post",
    data: data,
  });
}

// 获取评价详情
export function getEvaluateDetailAPI(data) {
  return request({
    url: "/tEvaluate/evaluateGetById",
    method: "post",
    data: data,
  });
}

// 老师评价列表
export function getEvaluateTeacherListAPI(data) {
  return request({
    url: "/tEvaluate/evaluateTeacherList",
    method: "get",
    params: data,
  });
}
